package mobidever.mygodutch.database.base;

import java.util.ArrayList;

import mobidever.mygodutch.R;
import mobidever.mygodutch.R.array;
import android.R.integer;
import android.content.Context;

public class SQliteDataBaseConfig
{
	private static Context mContext;
	private static final String DATABASE_NAME = "GoDutchDataBase";
	private static final int VERSION = 1;
	private static SQliteDataBaseConfig INSTANCE;
	
	public SQliteDataBaseConfig()
	{
		
	}
	
	public static SQliteDataBaseConfig getInstance(Context pContext)
	{
		mContext = pContext;
		if (INSTANCE == null)
		{
			INSTANCE = new SQliteDataBaseConfig();
		}
		return INSTANCE;
	}
	
	public String getDataBaseName()
	{
		return DATABASE_NAME;
	}
	
	public int getDataBaseVersion()
	{
		return VERSION;
	}
	
	public Context getContext()
	{
		return mContext;
	}
	
	public ArrayList<String> getTable()
	{
		ArrayList<String> _ArrayList = new ArrayList<String>();
		String[] _ClassName = getContext().getResources().getStringArray(R.array.SQLiteDALClassName);
		for (int i = 0; i < _ClassName.length; i++)
		{
			String _ClassPath = getContext().getPackageName() + ".database.sqlitedal." + _ClassName[i];
			_ArrayList.add(_ClassPath);
		}
		return _ArrayList;
	}
}
